#!/usr/bin/php
<?php
require_once('phpcassa/connection.php');
require_once('phpcassa/columnfamily.php');

$visitors = array("1" => "111111111", "2" => "222222222", "3" => "333333333", "4" => "444444444", "5" => "555555555", "6" => "666666666", "7" => "777777777");
$servers = array("10.169.42.95:9160", "10.169.41.152:9160", "10.169.3.177:9160", "10.168.237.233:9160", "10.169.62.182:9160", "10.176.46.224:9160");
$pool = new ConnectionPool("Visitor", $servers);
$column_family = new ColumnFamily($pool, 'ExposureHistoryStandard');
echo "\n";
$i=1;
while($i < 8){
	$Key = "canary:".$visitors[$i];
	try {
		$Trait = $column_family->get($Key);
		echo "     Canary: ".$visitors[$i]."  -  BT Trait: ".$Trait['bt_tag_data']."\n";
	} catch (cassandra_NotFoundException $nfe) {
		echo "     Canary: ".$visitors[$i]."  -  BT Trait: NOT FOUND\n";
	}
	$i++;
}
echo "\n";

?>